<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">
            <a href="{:url('index/index/index')}" class="navbar-brand">DreamPHP</a>
        </div>
        <div class="navbar-menu">
            <ul class="nav navbar-nav">
                <li><a href="{:url('index/index/index')}">首页</a></li>
                {volist name="cateInfo" id="vo"}
                <li><a href="{:url('index/index/index', ['cateid' => $vo.id])}">{$vo.catename}</a></li>
                {/volist}
            </ul>
            <ul class="nav navbar-nav navbar-right">
                {if session('?username')}
                <li><a href="#">{:session('username')}</a></li>
                <li><a href="{:url('index/index/loginout')}">退出</a></li>
                {else /}
                <li><a href="{:url('index/index/login')}">登录</a></li>
                <li><a href="register.html">注册</a></li>
                {/if}
            </ul>
        </div>
    </div>
</nav>